class Porson:
    #静态属性
    name = "石头"
    gender = "男"
    age = 6
    def __init__(self,name,gender,age):
        self.name = name
        self.gender = gender
        self.age = age

    #动态行为
    def eat(self):
        print(f"{self.name} is eating")
    def sleep(self):
        print("sleeping")
    def play(self):
        print("playing")


#实例化一个人

# p1 = Porson(name="果果",gender="女",age="6")
# print(p1.name)
p2 = Porson(name="文文",gender="女",age="6")
print(p2.name)
print(p2.eat())

class Student(Porson):
    number:int
    def __init__(self,name,gender,age,number):
         super(Student, self).__init__(name,gender,age)
         self.number = number

    def sing(self):
        print(f"{self.name} is singing")
    def play(self):
        return "play ball"
s1 = Student(name="开心",gender="女",age="6",number="36")

print(s1.number)
print(s1.sing())
print(s1.play())



